package com.sun.springboot_mq.hello.receiver;

import com.sun.springboot_mq.hello.entry.User;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**接受者
 * @author shkstart
 * @create 2021-10-24 18:05
 */
@Component
@RabbitListener(queues = "object")
public class ObjectReceiver {
    @RabbitHandler
    public void process(User user){
        System.out.println("objectReceiver接收方:  : " + user);
    }
}
